import Vue from 'vue'
import Vuex from 'vuex'
import getters from './getters'

Vue.use(Vuex)

const store = new Vuex.Store({
  getters,
  state: {
    newOrEditor: true,
    editData: []
  },
  mutations: {
    editFlag(state, payload) {
      state.newOrEditor = payload.flag
      state.editData = payload.data
    }
  }
})

export default store
